/**
*@Author: QWP
*@Description: 收文相关接口
*@Date 2024-09-03 19:04
*/
import request from '@/http'

// 列表分页查询
export const page = async (data: object) => {
  return await request.post({
    url: '/api/bizz/busiTIncDocaccept/page',
    data: data
  })
}

// 新增
export const add = async (data: object) => {
  return await request.post({
    url: '/api/bizz/busiTIncDocaccept',
    data: data,
  })
}

// 更新
export const update = async (data: object) => {
  return await request.post({
    url: '/api/bizz/busiTIncDocaccept/update',
    data: data
  })
}

// 删除
export const del = async (data: Array<any>) => {
  return await request.post({
    url: '/api/bizz/busiTIncDocaccept/delete',
    data,
    headersType: 'application/x-www-form-urlencoded'
  })
}

// 单体查询
export const query = async (id: String) => {
  return await request.get({
    url: '/api/bizz/busiTIncDocaccept/details/' + id,
  })
}

// 查询待办
export const queryToDo = async (data) => {
  return await request.post({
    url: '/api/bizz/busiTIncDocaccept/queryToDo',
    data
  })
}

// 收文归档
export const updateIsFilter = async (id: String) => {
  return await request.get({
    url: '/api/bizz/busiTIncDocaccept/updateIsFilter/' + id,
  })
}

// 统计报表-发文-收文统计
export const groupbyMonthAndUrgencyDegree = async (data: object) => {
  return await request.post({
    url: '/api/bizz/busiTIncDoc/groupbyMonthAndUrgencyDegree',
    data
  })
}

// 收文通知
export const incaccptnotice = async (keyid: string, data: object) => {
  return await request.post({
    url: '/api/bizz/busiTIncDoc/incaccptnotice/'+ keyid,
    data
  })
}

// 导出
export const download = async (data: object) => {
  return await request.download1({
    url: '/api/bizz/busiTIncDocaccept/export',
    data
  })
}
